﻿@using Single_SignOn.Areas.Handheld.Models
@using Single_SignOn.ResX
@using Single_SignOn.Models
@model IEnumerable<Single_SignOn.Areas.Handheld.Models.ApplicationList>
<fieldset>
    <table style="width: 100%;" class="center">
        <tr>
            <td style="width: 100%;" class="center">
                <label>
                    <h4>@ResourceTools.GetResource("Resource", "ApplicationList")</h4>
                </label>
            </td>
        </tr>
    </table>
    <ol style="vertical-align: middle; width: 100%; text-align: center;">
        @foreach (ApplicationList oApplicationList in Model)
        {
            <li style="margin-top: 5px; vertical-align: middle; width: 100%; text-align: center;">
                <div  style="margin-left: 5%;margin-right: 5%;">
                     <div style="width: 100%; background-color:#ffffff;height: 16px; vertical-align: middle;cursor:pointer;"
                         class="ApplicationList" title="@oApplicationList.Description"  data="@oApplicationList.ApplNo">
                         <div style="margin-top: 0;height: 3px; "></div>
                         <div style="margin-top: 0;height: 10px; color: #000000;">
                             <label style="margin-top: 0;vertical-align: middle;height: 10px;font-weight: bolder;">@oApplicationList.Application</label>
                         </div>
                         <div style="margin-top: 0;height: 3px; "></div>
                         </div>
                </div>
            </li>
        }
    </ol>
</fieldset>
<div class="display">
    <a id="urlApplicationLis" href="@Html.AttributeEncode(Url.Action("GetFunction", "ApplicationList", new { applicationList = "" }))" style="display:none;"></a>

    <script type="text/javascript">
        /**/ $(document).ready(function () {
            var language = $("#Language").val();
            var company = $("#Company").val();
            $('.ApplicationList').click(function (obj) {
                document.location.href = $('#urlApplicationLis').attr('href') + "?applno=" + $(this).attr('data') + "&company=" + company + "&language=" + language;
            });
        });
    </script>
</div>
